<!-- DataTables -->
<link rel="stylesheet"
	  href="./app/lib/datatables/media/css/dataTables.bootstrap.css">

<div ng-controller="memberdeliveraddress as gt">
<section class="content-header">
	<h1>
		{{title}}<small></small>
	</h1>
</section>
<section class="content">
	<div class="box box-default">
		<div class="col-md-12">
			<div class="box-body">
				<alertdanger></alertdanger>
				<alertsuccess></alertsuccess>
				<form role="form" >
					<div class="box-body">
						<div ng-show="membershow">
						<div class="form-group">
							<div class="box box-success">
								<div class="box-header with-border">
									<h3 class="box-title">搜索需要添加地址的会员</h3>
								</div>
							</div>
							<div class="col-xs-12">
								<div class="box">
									<div class="box-header"></div>
									<div class="box-body" >
										<table datatable="" dt-options="gt.dtOptions"
											   dt-columns="gt.dtColumns"
											   dt-instance="gt.dtInstance"
											   class="table table-striped table-bordered"></table>
									</div>
								</div>
							</div>
						</div>

						<div class="col-xs-12">
							<div class="box">
								<div class="box-header">
									<h3 class="box-title">已选择的会员</h3>
								</div><!-- /.box-header -->
								<div class="box-body table-responsive no-padding">
									<table class="table table-hover">
										<tr>
											<th>会员编号</th>
											<th>头像</th>
											<th>账号</th>
											<th>操作</th>
										</tr>
										<tr ng-repeat="at in selectedmembers track by $index">
											<td>{{at.id}}</td>
											<td><img class="img-responsive pad" style="width: 50px;height: 50px;" src="{{at.mainimg}}" alt="Photo"></td>
											<td>{{at.loginname}}</td>
											<td><button ng-click="removeselectmember($index);" class='btn btn-box-tool'>删除</button></td>
										</tr>

									</table>
								</div><!-- /.box-body -->
							</div><!-- /.box -->
						</div>
						</div>

						<div class="form-group">
							<label>收件人</label> <input maxlength="45" required="required" ng-model="consignee"
								class="form-control" type="text" placeholder="请输入收件人" value="">
						</div>

						<div class="form-group" ng-show="addressshow">
							<label>地址</label> <input maxlength="255" required="required" ng-model="address"
													  class="form-control" type="text" value="" readonly>
						</div>
						<div ng-show="modifyarashow" class="form-group">
							<button class="btn btn-default btn-block btn-sm" ng-click="clickmodifyaddress();">修改地址</button>
						</div>
						<div ng-show="areashow">
							<div class="form-group" ng-init="findallshengfen();">
								<label>选择省份</label> <select ng-change="changeshenfen();"
															ng-model="shengfenallx"
															ng-options="gs.name for gs in shengfenall"
															class="form-control select2" style="width: 100%;">
								<option ng－value="-1">--请选择--</option>
							</select>
							</div>
							<div ng-show="shishow" class="form-group">
								<label>选择市</label> <select ng-change="changeshi();"
									ng-model="shiallx"
									ng-options="gs.name for gs in shiall"
									class="form-control select2" style="width: 100%;">
								<option ng－value="-1">--请选择--</option>
							</select>
							</div>
							<div ng-show="qushow" class="form-group">
								<label>选择区</label> <select
									ng-model="quallx"
									ng-options="gs.name for gs in quall"
									class="form-control select2" style="width: 100%;">
								<option ng－value="-1">--请选择--</option>
							</select>
							</div>
						</div>
						<div class="form-group">
							<label>填写街道</label> <input maxlength="45" required="required" ng-model="street"
								class="form-control" type="text" placeholder="请输入街道" value="">
						</div>
						<div class="form-group">
							<label>填写地址</label> <input maxlength="255" required="required" ng-model="detail"
													   class="form-control" type="text" placeholder="请输入具体地址" value="">
						</div>
						<div class="form-group">
							<label>邮编</label> <input maxlength="20" required="required" ng-model="postcode"
													 class="form-control" type="text" placeholder="请输入邮编" value="">
						</div>
						<div class="form-group">
							<label>移动电话</label> <input maxlength="20" required="required" ng-model="mobile"
								class="form-control" type="text" placeholder="请输入移动电话" value="">
						</div>
						<div class="form-group">
							<label>座机</label> <input maxlength="20" required="required" ng-model="telno"
								class="form-control" type="text" placeholder="请输入座机" value="">
						</div>

						<div class="form-group">
							<label>邮箱</label> <input maxlength="20" required="required" ng-model="email"
								class="form-control" type="text" placeholder="请输入邮箱" value="">
						</div>


						<div class="form-group">
							<label>标签</label>
							<input maxlength="20" required="required" ng-model="email"
								   class="form-control" type="text" placeholder="请输入标签,例如家" value="">
						</div>
						<div class="form-group">
							<label>默认</label>
							<div class="control">
								<label> <input type="radio" ng-model="isdefault" ng-value="0"
									class="flat-red">否&nbsp;&nbsp;&nbsp;
								</label> <label> <input type="radio" ng-model="isdefault" ng-value="1"
									class="flat-red">是&nbsp;&nbsp;&nbsp;
								</label>
							</div>
						</div>
						<div class="form-group">
		                    <label>
		                      <input type="radio" ng-model="status" ng-value="1" class="flat-red" ng-checked="true">
		                      启用
		                    </label>
		                    <label>
		                      <input type="radio"  ng-model="status" ng-value="0" class="flat-red">
		                      禁用
		                    </label>
		               
	                  	</div>
					</div>
					<div class="box-footer">
						<button ng-show="savebtn.show"type="button" class="btn btn-primary" ng-click="save();">保存</button>
						<button ng-show="updatebtn.show" type="button" class="btn btn-primary" ng-click="update();">更新</button>
					</div>
				</form>
			</div>
		</div>
		<div class="box-footer"></div>
	</div>
</section>
</div>